<template>
  <div class="dashboard-container">
    <span class="dashboard-text">欢迎登录市场后台管理系统</span>
    <!-- <el-button class="dashboard-text" size="small" type="primary" @click="getIcon">图标</el-button>
    <el-button class="dashboard-text" @click="getLodop">打印</el-button> -->
  </div>
</template>

<script>
import { getLodop } from '@/utils/LodopFuncs'
export default {
  name: 'Dashboard',
  data() {
    return {
      options: [], // 默认为options的前10个
      value: ''
    }
  },
  computed: {

  },
  mounted() {
  },
  beforeDestroy() {
  },
  methods: {
    getLodop() {
      const LODOP = getLodop()
      var strHTML = document.getElementsByTagName('html')[0].innerHTML
      LODOP.PRINT_INITA(1, 1, 770, 660, '测试预览功能')
      LODOP.ADD_PRINT_TEXT(10, 60, 300, 200, '这是测试的纯文本，下面是超文本:')
      LODOP.ADD_PRINT_HTM(30, 5, '100%', '80%', strHTML)
      LODOP.PREVIEW()
    },
    btnSend() {
    },
    filterMethod(query) { // query是输入的关键字
      const options = []; for (let i = 1; i < 5000; i++)options.push({ label: 'Test' + i })
      if (query === '') { this.options = options.slice(0, 10) } else {
        const result = [] // 存储符合条件的下拉选项
        options.forEach(val => {
          if (val.label.indexOf(query) !== -1) result.push(val)
        })
        this.options = result.slice(0, 10) // 只取前10个
      }
    },
    getIcon() {
      this.$router.push({
        path: '/system/iconHtml'
      })
    }
  }
}
</script>

<style lang="scss" scoped>
.dashboard {
  &-container {
    // margin: 30px;
    background-color: #eaedff;
    padding: 20px;
    width: 100%;
    height: 100%;
  }

  &-text {
    font-size: 30px;
    line-height: 46px;
    font-weight: 600;
  }
}
</style>
